package com.eric.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author Eric
 * @date 2021.2.5
 */
@Data
@Accessors(chain = true)
@ApiModel("系统日志")
@TableName("t_api_log")
public class ApiLog {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("ip地址")
    private String ip;

    @ApiModelProperty("操作描述")
    private String description;

    @ApiModelProperty("请求参数")
    private String params;

    @ApiModelProperty("浏览器")
    private String browser;

    @ApiModelProperty("请求耗时")
    private Long castTime;

    @ApiModelProperty("日志类型")
    private Integer type;

    @ApiModelProperty("请求地址")
    private String url;

    @ApiModelProperty("请求类名和方法")
    private String classMethod;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("异常详情")
    private String exceptionDetail;

}